<template>
  <div class="p-2">
    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
      <div v-show="showSearch" class="mb-[10px]">
        <el-card shadow="hover">
          <el-form ref="queryFormRef" :model="queryParams" :inline="true">
            <el-form-item label="统筹区编码" prop="aaa027">
              <el-input v-model="queryParams.aaa027" placeholder="请输入统筹区编码" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="dwh">
              <el-input v-model="queryParams.dwh" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="原编号" prop="grbh">
              <el-input v-model="queryParams.grbh" placeholder="请输入原编号" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr00">
              <el-input v-model="queryParams.gr00" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="单位编码" prop="dw01">
              <el-input v-model="queryParams.dw01" placeholder="请输入单位编码" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="单位名称" prop="dw02">
              <el-input v-model="queryParams.dw02" placeholder="请输入单位名称" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="bh">
              <el-input v-model="queryParams.bh" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="grid">
              <el-input v-model="queryParams.grid" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="个人编号" prop="gr01">
              <el-input v-model="queryParams.gr01" placeholder="请输入个人编号" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="身份证号码" prop="gr02">
              <el-input v-model="queryParams.gr02" placeholder="请输入身份证号码" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="个人帐号" prop="gr03">
              <el-input v-model="queryParams.gr03" placeholder="请输入个人帐号" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="职工姓名" prop="gr04">
              <el-input v-model="queryParams.gr04" placeholder="请输入职工姓名" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="性别" prop="gr05">
              <el-input v-model="queryParams.gr05" placeholder="请输入性别" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="民族" prop="gr06">
              <el-input v-model="queryParams.gr06" placeholder="请输入民族" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="出生时间" prop="gr07">
              <el-date-picker clearable
                v-model="queryParams.gr07"
                type="date"
                value-format="YYYY-MM-DD"
                placeholder="请选择出生时间"
              />
            </el-form-item>
            <el-form-item label="工作时间" prop="gr08">
              <el-date-picker clearable
                v-model="queryParams.gr08"
                type="date"
                value-format="YYYY-MM-DD"
                placeholder="请选择工作时间"
              />
            </el-form-item>
            <el-form-item label="职工身份" prop="gr09">
              <el-input v-model="queryParams.gr09" placeholder="请输入职工身份" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="建立帐户时间" prop="gr10">
              <el-date-picker clearable
                v-model="queryParams.gr10"
                type="date"
                value-format="YYYY-MM-DD"
                placeholder="请选择建立帐户时间"
              />
            </el-form-item>
            <el-form-item label="计算值" prop="gr11a">
              <el-input v-model="queryParams.gr11a" placeholder="请输入计算值" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="调整值" prop="gr11b">
              <el-input v-model="queryParams.gr11b" placeholder="请输入调整值" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="视同" prop="gr11">
              <el-input v-model="queryParams.gr11" placeholder="请输入视同" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="统筹开始时间" prop="gr12">
              <el-date-picker clearable
                v-model="queryParams.gr12"
                type="date"
                value-format="YYYY-MM-DD"
                placeholder="请选择统筹开始时间"
              />
            </el-form-item>
            <el-form-item label="统筹结束时间" prop="gr13">
              <el-date-picker clearable
                v-model="queryParams.gr13"
                type="date"
                value-format="YYYY-MM-DD"
                placeholder="请选择统筹结束时间"
              />
            </el-form-item>
            <el-form-item label="统筹缴费月" prop="gr14">
              <el-input v-model="queryParams.gr14" placeholder="请输入统筹缴费月" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="统筹缴费总额" prop="gr15">
              <el-input v-model="queryParams.gr15" placeholder="请输入统筹缴费总额" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="统筹单位缴费额" prop="gr16">
              <el-input v-model="queryParams.gr16" placeholder="请输入统筹单位缴费额" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="统筹个人缴费额" prop="gr17">
              <el-input v-model="queryParams.gr17" placeholder="请输入统筹个人缴费额" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="实际工资" prop="gr18">
              <el-input v-model="queryParams.gr18" placeholder="请输入实际工资" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="缴费基数" prop="gr19">
              <el-input v-model="queryParams.gr19" placeholder="请输入缴费基数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="个人缴费额" prop="gr20">
              <el-input v-model="queryParams.gr20" placeholder="请输入个人缴费额" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="94调标工资" prop="gr21">
              <el-input v-model="queryParams.gr21" placeholder="请输入94调标工资" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr210">
              <el-input v-model="queryParams.gr210" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr211">
              <el-input v-model="queryParams.gr211" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr212">
              <el-input v-model="queryParams.gr212" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr213">
              <el-input v-model="queryParams.gr213" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr214">
              <el-input v-model="queryParams.gr214" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="状态" prop="gr22">
              <el-input v-model="queryParams.gr22" placeholder="请输入状态" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="异动原因" prop="gr23">
              <el-input v-model="queryParams.gr23" placeholder="请输入异动原因" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="异动月份" prop="yd03">
              <el-input v-model="queryParams.yd03" placeholder="请输入异动月份" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="记帐月份" prop="yd08">
              <el-input v-model="queryParams.yd08" placeholder="请输入记帐月份" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="异动时补(退)额" prop="yd10">
              <el-input v-model="queryParams.yd10" placeholder="请输入异动时补(退)额" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="补(退)标志" prop="yd11">
              <el-input v-model="queryParams.yd11" placeholder="请输入补(退)标志" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="其中单位补(退)" prop="yd12">
              <el-input v-model="queryParams.yd12" placeholder="请输入其中单位补(退)" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="新工资" prop="gr24">
              <el-input v-model="queryParams.gr24" placeholder="请输入新工资" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="调出单位编码" prop="gr26">
              <el-input v-model="queryParams.gr26" placeholder="请输入调出单位编码" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="补充额标准" prop="gr50">
              <el-input v-model="queryParams.gr50" placeholder="请输入补充额标准" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="储蓄额标准" prop="gr51">
              <el-input v-model="queryParams.gr51" placeholder="请输入储蓄额标准" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="本次补充额" prop="gr52">
              <el-input v-model="queryParams.gr52" placeholder="请输入本次补充额" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="本次储蓄额" prop="gr53">
              <el-input v-model="queryParams.gr53" placeholder="请输入本次储蓄额" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr55">
              <el-input v-model="queryParams.gr55" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr57">
              <el-input v-model="queryParams.gr57" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="折算工龄" prop="gr60">
              <el-input v-model="queryParams.gr60" placeholder="请输入折算工龄" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="ed">
              <el-input v-model="queryParams.ed" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="edlp">
              <el-input v-model="queryParams.edlp" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="edsj">
              <el-input v-model="queryParams.edsj" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="操作员" prop="dw24">
              <el-input v-model="queryParams.dw24" placeholder="请输入操作员" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="系统时间" prop="systime">
              <el-date-picker clearable
                v-model="queryParams.systime"
                type="date"
                value-format="YYYY-MM-DD"
                placeholder="请选择系统时间"
              />
            </el-form-item>
            <el-form-item label="通讯地址" prop="tx52">
              <el-input v-model="queryParams.tx52" placeholder="请输入通讯地址" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="联系电话" prop="tx57">
              <el-input v-model="queryParams.tx57" placeholder="请输入联系电话" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="邮政编码" prop="tx58">
              <el-input v-model="queryParams.tx58" placeholder="请输入邮政编码" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="pass">
              <el-input v-model="queryParams.pass" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr61">
              <el-input v-model="queryParams.gr61" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr25">
              <el-input v-model="queryParams.gr25" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr18a">
              <el-input v-model="queryParams.gr18a" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr19a">
              <el-input v-model="queryParams.gr19a" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="gr24a">
              <el-input v-model="queryParams.gr24a" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="sfbj">
              <el-input v-model="queryParams.sfbj" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="tzqsy">
              <el-input v-model="queryParams.tzqsy" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="bz">
              <el-input v-model="queryParams.bz" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="" prop="tz01">
              <el-input v-model="queryParams.tz01" placeholder="请输入" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="文件地址" prop="fileurl">
              <el-input v-model="queryParams.fileurl" placeholder="请输入文件地址" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="单个上传确认表附件" prop="tableflieurl">
              <el-input v-model="queryParams.tableflieurl" placeholder="请输入单个上传确认表附件" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item>
              <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
              <el-button icon="Refresh" @click="resetQuery">重置</el-button>
            </el-form-item>
          </el-form>
        </el-card>
      </div>
    </transition>

    <el-card shadow="never">
      <template #header>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['yuanshidian:ab02new:add']">新增</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['yuanshidian:ab02new:edit']">修改</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['yuanshidian:ab02new:remove']">删除</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['yuanshidian:ab02new:export']">导出</el-button>
          </el-col>
          <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
      </template>

      <el-table v-loading="loading" :data="ab02newList" @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="主键ID" align="center" prop="id" v-if="true" />
        <el-table-column label="统筹区编码" align="center" prop="aaa027" />
        <el-table-column label="" align="center" prop="dwh" />
        <el-table-column label="原编号" align="center" prop="grbh" />
        <el-table-column label="" align="center" prop="gr00" />
        <el-table-column label="单位编码" align="center" prop="dw01" />
        <el-table-column label="单位名称" align="center" prop="dw02" />
        <el-table-column label="" align="center" prop="bh" />
        <el-table-column label="" align="center" prop="grid" />
        <el-table-column label="个人编号" align="center" prop="gr01" />
        <el-table-column label="身份证号码" align="center" prop="gr02" />
        <el-table-column label="个人帐号" align="center" prop="gr03" />
        <el-table-column label="职工姓名" align="center" prop="gr04" />
        <el-table-column label="性别" align="center" prop="gr05" />
        <el-table-column label="民族" align="center" prop="gr06" />
        <el-table-column label="出生时间" align="center" prop="gr07" width="180">
          <template #default="scope">
            <span>{{ parseTime(scope.row.gr07, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="工作时间" align="center" prop="gr08" width="180">
          <template #default="scope">
            <span>{{ parseTime(scope.row.gr08, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="职工身份" align="center" prop="gr09" />
        <el-table-column label="建立帐户时间" align="center" prop="gr10" width="180">
          <template #default="scope">
            <span>{{ parseTime(scope.row.gr10, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="计算值" align="center" prop="gr11a" />
        <el-table-column label="调整值" align="center" prop="gr11b" />
        <el-table-column label="视同" align="center" prop="gr11" />
        <el-table-column label="统筹开始时间" align="center" prop="gr12" width="180">
          <template #default="scope">
            <span>{{ parseTime(scope.row.gr12, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="统筹结束时间" align="center" prop="gr13" width="180">
          <template #default="scope">
            <span>{{ parseTime(scope.row.gr13, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="统筹缴费月" align="center" prop="gr14" />
        <el-table-column label="统筹缴费总额" align="center" prop="gr15" />
        <el-table-column label="统筹单位缴费额" align="center" prop="gr16" />
        <el-table-column label="统筹个人缴费额" align="center" prop="gr17" />
        <el-table-column label="实际工资" align="center" prop="gr18" />
        <el-table-column label="缴费基数" align="center" prop="gr19" />
        <el-table-column label="个人缴费额" align="center" prop="gr20" />
        <el-table-column label="94调标工资" align="center" prop="gr21" />
        <el-table-column label="" align="center" prop="gr210" />
        <el-table-column label="" align="center" prop="gr211" />
        <el-table-column label="" align="center" prop="gr212" />
        <el-table-column label="" align="center" prop="gr213" />
        <el-table-column label="" align="center" prop="gr214" />
        <el-table-column label="状态" align="center" prop="gr22" />
        <el-table-column label="异动原因" align="center" prop="gr23" />
        <el-table-column label="异动月份" align="center" prop="yd03" />
        <el-table-column label="记帐月份" align="center" prop="yd08" />
        <el-table-column label="异动时补(退)额" align="center" prop="yd10" />
        <el-table-column label="补(退)标志" align="center" prop="yd11" />
        <el-table-column label="其中单位补(退)" align="center" prop="yd12" />
        <el-table-column label="新工资" align="center" prop="gr24" />
        <el-table-column label="调出单位编码" align="center" prop="gr26" />
        <el-table-column label="补充额标准" align="center" prop="gr50" />
        <el-table-column label="储蓄额标准" align="center" prop="gr51" />
        <el-table-column label="本次补充额" align="center" prop="gr52" />
        <el-table-column label="本次储蓄额" align="center" prop="gr53" />
        <el-table-column label="" align="center" prop="gr55" />
        <el-table-column label="" align="center" prop="gr57" />
        <el-table-column label="折算工龄" align="center" prop="gr60" />
        <el-table-column label="" align="center" prop="ed" />
        <el-table-column label="" align="center" prop="edlp" />
        <el-table-column label="" align="center" prop="edsj" />
        <el-table-column label="操作员" align="center" prop="dw24" />
        <el-table-column label="系统时间" align="center" prop="systime" width="180">
          <template #default="scope">
            <span>{{ parseTime(scope.row.systime, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="通讯地址" align="center" prop="tx52" />
        <el-table-column label="联系电话" align="center" prop="tx57" />
        <el-table-column label="邮政编码" align="center" prop="tx58" />
        <el-table-column label="" align="center" prop="pass" />
        <el-table-column label="" align="center" prop="gr61" />
        <el-table-column label="" align="center" prop="gr25" />
        <el-table-column label="" align="center" prop="gr18a" />
        <el-table-column label="" align="center" prop="gr19a" />
        <el-table-column label="" align="center" prop="gr24a" />
        <el-table-column label="" align="center" prop="sfbj" />
        <el-table-column label="" align="center" prop="tzqsy" />
        <el-table-column label="" align="center" prop="bz" />
        <el-table-column label="" align="center" prop="tz01" />
        <el-table-column label="数据状态:1待提交2审核中3已审核4驳回" align="center" prop="status" />
        <el-table-column label="删除状态:0未删除，1已删除" align="center" prop="delStatus" />
        <el-table-column label="文件地址" align="center" prop="fileurl" />
        <el-table-column label="单个上传确认表附件" align="center" prop="tableflieurl" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template #default="scope">
            <el-tooltip content="修改" placement="top">
              <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['yuanshidian:ab02new:edit']"></el-button>
            </el-tooltip>
            <el-tooltip content="删除" placement="top">
              <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['yuanshidian:ab02new:remove']"></el-button>
            </el-tooltip>
          </template>
        </el-table-column>
      </el-table>

      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
    </el-card>
    <!-- 添加或修改新在职人员信息对话框 -->
    <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
      <el-form ref="ab02newFormRef" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="统筹区编码" prop="aaa027">
          <el-input v-model="form.aaa027" placeholder="请输入统筹区编码" />
        </el-form-item>
        <el-form-item label="" prop="dwh">
          <el-input v-model="form.dwh" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="原编号" prop="grbh">
          <el-input v-model="form.grbh" placeholder="请输入原编号" />
        </el-form-item>
        <el-form-item label="" prop="gr00">
          <el-input v-model="form.gr00" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="单位编码" prop="dw01">
          <el-input v-model="form.dw01" placeholder="请输入单位编码" />
        </el-form-item>
        <el-form-item label="单位名称" prop="dw02">
          <el-input v-model="form.dw02" placeholder="请输入单位名称" />
        </el-form-item>
        <el-form-item label="" prop="bh">
          <el-input v-model="form.bh" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="grid">
          <el-input v-model="form.grid" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="个人编号" prop="gr01">
          <el-input v-model="form.gr01" placeholder="请输入个人编号" />
        </el-form-item>
        <el-form-item label="身份证号码" prop="gr02">
          <el-input v-model="form.gr02" placeholder="请输入身份证号码" />
        </el-form-item>
        <el-form-item label="个人帐号" prop="gr03">
          <el-input v-model="form.gr03" placeholder="请输入个人帐号" />
        </el-form-item>
        <el-form-item label="职工姓名" prop="gr04">
          <el-input v-model="form.gr04" placeholder="请输入职工姓名" />
        </el-form-item>
        <el-form-item label="性别" prop="gr05">
          <el-input v-model="form.gr05" placeholder="请输入性别" />
        </el-form-item>
        <el-form-item label="民族" prop="gr06">
          <el-input v-model="form.gr06" placeholder="请输入民族" />
        </el-form-item>
        <el-form-item label="出生时间" prop="gr07">
          <el-date-picker clearable
            v-model="form.gr07"
            type="datetime"
            value-format="YYYY-MM-DD HH:mm:ss"
            placeholder="请选择出生时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="工作时间" prop="gr08">
          <el-date-picker clearable
            v-model="form.gr08"
            type="datetime"
            value-format="YYYY-MM-DD HH:mm:ss"
            placeholder="请选择工作时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="职工身份" prop="gr09">
          <el-input v-model="form.gr09" placeholder="请输入职工身份" />
        </el-form-item>
        <el-form-item label="建立帐户时间" prop="gr10">
          <el-date-picker clearable
            v-model="form.gr10"
            type="datetime"
            value-format="YYYY-MM-DD HH:mm:ss"
            placeholder="请选择建立帐户时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="计算值" prop="gr11a">
          <el-input v-model="form.gr11a" placeholder="请输入计算值" />
        </el-form-item>
        <el-form-item label="调整值" prop="gr11b">
          <el-input v-model="form.gr11b" placeholder="请输入调整值" />
        </el-form-item>
        <el-form-item label="视同" prop="gr11">
          <el-input v-model="form.gr11" placeholder="请输入视同" />
        </el-form-item>
        <el-form-item label="统筹开始时间" prop="gr12">
          <el-date-picker clearable
            v-model="form.gr12"
            type="datetime"
            value-format="YYYY-MM-DD HH:mm:ss"
            placeholder="请选择统筹开始时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="统筹结束时间" prop="gr13">
          <el-date-picker clearable
            v-model="form.gr13"
            type="datetime"
            value-format="YYYY-MM-DD HH:mm:ss"
            placeholder="请选择统筹结束时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="统筹缴费月" prop="gr14">
          <el-input v-model="form.gr14" placeholder="请输入统筹缴费月" />
        </el-form-item>
        <el-form-item label="统筹缴费总额" prop="gr15">
          <el-input v-model="form.gr15" placeholder="请输入统筹缴费总额" />
        </el-form-item>
        <el-form-item label="统筹单位缴费额" prop="gr16">
          <el-input v-model="form.gr16" placeholder="请输入统筹单位缴费额" />
        </el-form-item>
        <el-form-item label="统筹个人缴费额" prop="gr17">
          <el-input v-model="form.gr17" placeholder="请输入统筹个人缴费额" />
        </el-form-item>
        <el-form-item label="实际工资" prop="gr18">
          <el-input v-model="form.gr18" placeholder="请输入实际工资" />
        </el-form-item>
        <el-form-item label="缴费基数" prop="gr19">
          <el-input v-model="form.gr19" placeholder="请输入缴费基数" />
        </el-form-item>
        <el-form-item label="个人缴费额" prop="gr20">
          <el-input v-model="form.gr20" placeholder="请输入个人缴费额" />
        </el-form-item>
        <el-form-item label="94调标工资" prop="gr21">
          <el-input v-model="form.gr21" placeholder="请输入94调标工资" />
        </el-form-item>
        <el-form-item label="" prop="gr210">
          <el-input v-model="form.gr210" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr211">
          <el-input v-model="form.gr211" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr212">
          <el-input v-model="form.gr212" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr213">
          <el-input v-model="form.gr213" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr214">
          <el-input v-model="form.gr214" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="状态" prop="gr22">
          <el-input v-model="form.gr22" placeholder="请输入状态" />
        </el-form-item>
        <el-form-item label="异动原因" prop="gr23">
          <el-input v-model="form.gr23" placeholder="请输入异动原因" />
        </el-form-item>
        <el-form-item label="异动月份" prop="yd03">
          <el-input v-model="form.yd03" placeholder="请输入异动月份" />
        </el-form-item>
        <el-form-item label="记帐月份" prop="yd08">
          <el-input v-model="form.yd08" placeholder="请输入记帐月份" />
        </el-form-item>
        <el-form-item label="异动时补(退)额" prop="yd10">
          <el-input v-model="form.yd10" placeholder="请输入异动时补(退)额" />
        </el-form-item>
        <el-form-item label="补(退)标志" prop="yd11">
          <el-input v-model="form.yd11" placeholder="请输入补(退)标志" />
        </el-form-item>
        <el-form-item label="其中单位补(退)" prop="yd12">
          <el-input v-model="form.yd12" placeholder="请输入其中单位补(退)" />
        </el-form-item>
        <el-form-item label="新工资" prop="gr24">
          <el-input v-model="form.gr24" placeholder="请输入新工资" />
        </el-form-item>
        <el-form-item label="调出单位编码" prop="gr26">
          <el-input v-model="form.gr26" placeholder="请输入调出单位编码" />
        </el-form-item>
        <el-form-item label="补充额标准" prop="gr50">
          <el-input v-model="form.gr50" placeholder="请输入补充额标准" />
        </el-form-item>
        <el-form-item label="储蓄额标准" prop="gr51">
          <el-input v-model="form.gr51" placeholder="请输入储蓄额标准" />
        </el-form-item>
        <el-form-item label="本次补充额" prop="gr52">
          <el-input v-model="form.gr52" placeholder="请输入本次补充额" />
        </el-form-item>
        <el-form-item label="本次储蓄额" prop="gr53">
          <el-input v-model="form.gr53" placeholder="请输入本次储蓄额" />
        </el-form-item>
        <el-form-item label="" prop="gr55">
          <el-input v-model="form.gr55" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr57">
          <el-input v-model="form.gr57" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="折算工龄" prop="gr60">
          <el-input v-model="form.gr60" placeholder="请输入折算工龄" />
        </el-form-item>
        <el-form-item label="" prop="ed">
          <el-input v-model="form.ed" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="edlp">
          <el-input v-model="form.edlp" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="edsj">
          <el-input v-model="form.edsj" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="操作员" prop="dw24">
          <el-input v-model="form.dw24" placeholder="请输入操作员" />
        </el-form-item>
        <el-form-item label="系统时间" prop="systime">
          <el-date-picker clearable
            v-model="form.systime"
            type="datetime"
            value-format="YYYY-MM-DD HH:mm:ss"
            placeholder="请选择系统时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="通讯地址" prop="tx52">
          <el-input v-model="form.tx52" placeholder="请输入通讯地址" />
        </el-form-item>
        <el-form-item label="联系电话" prop="tx57">
          <el-input v-model="form.tx57" placeholder="请输入联系电话" />
        </el-form-item>
        <el-form-item label="邮政编码" prop="tx58">
          <el-input v-model="form.tx58" placeholder="请输入邮政编码" />
        </el-form-item>
        <el-form-item label="" prop="pass">
          <el-input v-model="form.pass" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr61">
          <el-input v-model="form.gr61" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr25">
          <el-input v-model="form.gr25" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr18a">
          <el-input v-model="form.gr18a" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr19a">
          <el-input v-model="form.gr19a" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="gr24a">
          <el-input v-model="form.gr24a" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="sfbj">
          <el-input v-model="form.sfbj" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="tzqsy">
          <el-input v-model="form.tzqsy" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="bz">
          <el-input v-model="form.bz" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="" prop="tz01">
          <el-input v-model="form.tz01" placeholder="请输入" />
        </el-form-item>
        <el-form-item label="文件地址" prop="fileurl">
          <el-input v-model="form.fileurl" placeholder="请输入文件地址" />
        </el-form-item>
        <el-form-item label="单个上传确认表附件" prop="tableflieurl">
          <el-input v-model="form.tableflieurl" placeholder="请输入单个上传确认表附件" />
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup name="Ab02new" lang="ts">
import { listAb02new, getAb02new, delAb02new, addAb02new, updateAb02new } from '@/api/yuanshidian/ab02new';
import { Ab02newVO, Ab02newQuery, Ab02newForm } from '@/api/yuanshidian/ab02new/types';

const { proxy } = getCurrentInstance() as ComponentInternalInstance;

const ab02newList = ref<Ab02newVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);

const queryFormRef = ref<ElFormInstance>();
const ab02newFormRef = ref<ElFormInstance>();

const dialog = reactive<DialogOption>({
  visible: false,
  title: ''
});

const initFormData: Ab02newForm = {
  id: undefined,
  aaa027: undefined,
  dwh: undefined,
  grbh: undefined,
  gr00: undefined,
  dw01: undefined,
  dw02: undefined,
  bh: undefined,
  grid: undefined,
  gr01: undefined,
  gr02: undefined,
  gr03: undefined,
  gr04: undefined,
  gr05: undefined,
  gr06: undefined,
  gr07: undefined,
  gr08: undefined,
  gr09: undefined,
  gr10: undefined,
  gr11a: undefined,
  gr11b: undefined,
  gr11: undefined,
  gr12: undefined,
  gr13: undefined,
  gr14: undefined,
  gr15: undefined,
  gr16: undefined,
  gr17: undefined,
  gr18: undefined,
  gr19: undefined,
  gr20: undefined,
  gr21: undefined,
  gr210: undefined,
  gr211: undefined,
  gr212: undefined,
  gr213: undefined,
  gr214: undefined,
  gr22: undefined,
  gr23: undefined,
  yd03: undefined,
  yd08: undefined,
  yd10: undefined,
  yd11: undefined,
  yd12: undefined,
  gr24: undefined,
  gr26: undefined,
  gr50: undefined,
  gr51: undefined,
  gr52: undefined,
  gr53: undefined,
  gr55: undefined,
  gr57: undefined,
  gr60: undefined,
  ed: undefined,
  edlp: undefined,
  edsj: undefined,
  dw24: undefined,
  systime: undefined,
  tx52: undefined,
  tx57: undefined,
  tx58: undefined,
  pass: undefined,
  gr61: undefined,
  gr25: undefined,
  gr18a: undefined,
  gr19a: undefined,
  gr24a: undefined,
  sfbj: undefined,
  tzqsy: undefined,
  bz: undefined,
  tz01: undefined,
  status: undefined,
  delStatus: undefined,
  fileurl: undefined,
  tableflieurl: undefined,
}
const data = reactive<PageData<Ab02newForm, Ab02newQuery>>({
  form: {...initFormData},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    aaa027: undefined,
    dwh: undefined,
    grbh: undefined,
    gr00: undefined,
    dw01: undefined,
    dw02: undefined,
    bh: undefined,
    grid: undefined,
    gr01: undefined,
    gr02: undefined,
    gr03: undefined,
    gr04: undefined,
    gr05: undefined,
    gr06: undefined,
    gr07: undefined,
    gr08: undefined,
    gr09: undefined,
    gr10: undefined,
    gr11a: undefined,
    gr11b: undefined,
    gr11: undefined,
    gr12: undefined,
    gr13: undefined,
    gr14: undefined,
    gr15: undefined,
    gr16: undefined,
    gr17: undefined,
    gr18: undefined,
    gr19: undefined,
    gr20: undefined,
    gr21: undefined,
    gr210: undefined,
    gr211: undefined,
    gr212: undefined,
    gr213: undefined,
    gr214: undefined,
    gr22: undefined,
    gr23: undefined,
    yd03: undefined,
    yd08: undefined,
    yd10: undefined,
    yd11: undefined,
    yd12: undefined,
    gr24: undefined,
    gr26: undefined,
    gr50: undefined,
    gr51: undefined,
    gr52: undefined,
    gr53: undefined,
    gr55: undefined,
    gr57: undefined,
    gr60: undefined,
    ed: undefined,
    edlp: undefined,
    edsj: undefined,
    dw24: undefined,
    systime: undefined,
    tx52: undefined,
    tx57: undefined,
    tx58: undefined,
    pass: undefined,
    gr61: undefined,
    gr25: undefined,
    gr18a: undefined,
    gr19a: undefined,
    gr24a: undefined,
    sfbj: undefined,
    tzqsy: undefined,
    bz: undefined,
    tz01: undefined,
    status: undefined,
    delStatus: undefined,
    fileurl: undefined,
    tableflieurl: undefined,
    params: {
    }
  },
  rules: {
    id: [
      { required: true, message: "主键ID不能为空", trigger: "blur" }
    ],
    aaa027: [
      { required: true, message: "统筹区编码不能为空", trigger: "blur" }
    ],
    dwh: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    grbh: [
      { required: true, message: "原编号不能为空", trigger: "blur" }
    ],
    gr00: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    dw01: [
      { required: true, message: "单位编码不能为空", trigger: "blur" }
    ],
    dw02: [
      { required: true, message: "单位名称不能为空", trigger: "blur" }
    ],
    bh: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    grid: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr01: [
      { required: true, message: "个人编号不能为空", trigger: "blur" }
    ],
    gr02: [
      { required: true, message: "身份证号码不能为空", trigger: "blur" }
    ],
    gr03: [
      { required: true, message: "个人帐号不能为空", trigger: "blur" }
    ],
    gr04: [
      { required: true, message: "职工姓名不能为空", trigger: "blur" }
    ],
    gr05: [
      { required: true, message: "性别不能为空", trigger: "blur" }
    ],
    gr06: [
      { required: true, message: "民族不能为空", trigger: "blur" }
    ],
    gr07: [
      { required: true, message: "出生时间不能为空", trigger: "blur" }
    ],
    gr08: [
      { required: true, message: "工作时间不能为空", trigger: "blur" }
    ],
    gr09: [
      { required: true, message: "职工身份不能为空", trigger: "blur" }
    ],
    gr10: [
      { required: true, message: "建立帐户时间不能为空", trigger: "blur" }
    ],
    gr11a: [
      { required: true, message: "计算值不能为空", trigger: "blur" }
    ],
    gr11b: [
      { required: true, message: "调整值不能为空", trigger: "blur" }
    ],
    gr11: [
      { required: true, message: "视同不能为空", trigger: "blur" }
    ],
    gr12: [
      { required: true, message: "统筹开始时间不能为空", trigger: "blur" }
    ],
    gr13: [
      { required: true, message: "统筹结束时间不能为空", trigger: "blur" }
    ],
    gr14: [
      { required: true, message: "统筹缴费月不能为空", trigger: "blur" }
    ],
    gr15: [
      { required: true, message: "统筹缴费总额不能为空", trigger: "blur" }
    ],
    gr16: [
      { required: true, message: "统筹单位缴费额不能为空", trigger: "blur" }
    ],
    gr17: [
      { required: true, message: "统筹个人缴费额不能为空", trigger: "blur" }
    ],
    gr18: [
      { required: true, message: "实际工资不能为空", trigger: "blur" }
    ],
    gr19: [
      { required: true, message: "缴费基数不能为空", trigger: "blur" }
    ],
    gr20: [
      { required: true, message: "个人缴费额不能为空", trigger: "blur" }
    ],
    gr21: [
      { required: true, message: "94调标工资不能为空", trigger: "blur" }
    ],
    gr210: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr211: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr212: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr213: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr214: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr22: [
      { required: true, message: "状态不能为空", trigger: "blur" }
    ],
    gr23: [
      { required: true, message: "异动原因不能为空", trigger: "blur" }
    ],
    yd03: [
      { required: true, message: "异动月份不能为空", trigger: "blur" }
    ],
    yd08: [
      { required: true, message: "记帐月份不能为空", trigger: "blur" }
    ],
    yd10: [
      { required: true, message: "异动时补(退)额不能为空", trigger: "blur" }
    ],
    yd11: [
      { required: true, message: "补(退)标志不能为空", trigger: "blur" }
    ],
    yd12: [
      { required: true, message: "其中单位补(退)不能为空", trigger: "blur" }
    ],
    gr24: [
      { required: true, message: "新工资不能为空", trigger: "blur" }
    ],
    gr26: [
      { required: true, message: "调出单位编码不能为空", trigger: "blur" }
    ],
    gr50: [
      { required: true, message: "补充额标准不能为空", trigger: "blur" }
    ],
    gr51: [
      { required: true, message: "储蓄额标准不能为空", trigger: "blur" }
    ],
    gr52: [
      { required: true, message: "本次补充额不能为空", trigger: "blur" }
    ],
    gr53: [
      { required: true, message: "本次储蓄额不能为空", trigger: "blur" }
    ],
    gr55: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr57: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr60: [
      { required: true, message: "折算工龄不能为空", trigger: "blur" }
    ],
    ed: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    edlp: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    edsj: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    dw24: [
      { required: true, message: "操作员不能为空", trigger: "blur" }
    ],
    systime: [
      { required: true, message: "系统时间不能为空", trigger: "blur" }
    ],
    tx52: [
      { required: true, message: "通讯地址不能为空", trigger: "blur" }
    ],
    tx57: [
      { required: true, message: "联系电话不能为空", trigger: "blur" }
    ],
    tx58: [
      { required: true, message: "邮政编码不能为空", trigger: "blur" }
    ],
    pass: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr61: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr25: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr18a: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr19a: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    gr24a: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    sfbj: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    tzqsy: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    bz: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    tz01: [
      { required: true, message: "不能为空", trigger: "blur" }
    ],
    status: [
      { required: true, message: "数据状态:1待提交2审核中3已审核4驳回不能为空", trigger: "change" }
    ],
    delStatus: [
      { required: true, message: "删除状态:0未删除，1已删除不能为空", trigger: "change" }
    ],
    fileurl: [
      { required: true, message: "文件地址不能为空", trigger: "blur" }
    ],
    tableflieurl: [
      { required: true, message: "单个上传确认表附件不能为空", trigger: "blur" }
    ],
  }
});

const { queryParams, form, rules } = toRefs(data);

/** 查询新在职人员信息列表 */
const getList = async () => {
  loading.value = true;
  const res = await listAb02new(queryParams.value);
  ab02newList.value = res.rows;
  total.value = res.total;
  loading.value = false;
}

/** 取消按钮 */
const cancel = () => {
  reset();
  dialog.visible = false;
}

/** 表单重置 */
const reset = () => {
  form.value = {...initFormData};
  ab02newFormRef.value?.resetFields();
}

/** 搜索按钮操作 */
const handleQuery = () => {
  queryParams.value.pageNum = 1;
  getList();
}

/** 重置按钮操作 */
const resetQuery = () => {
  queryFormRef.value?.resetFields();
  handleQuery();
}

/** 多选框选中数据 */
const handleSelectionChange = (selection: Ab02newVO[]) => {
  ids.value = selection.map(item => item.id);
  single.value = selection.length != 1;
  multiple.value = !selection.length;
}

/** 新增按钮操作 */
const handleAdd = () => {
  reset();
  dialog.visible = true;
  dialog.title = "添加新在职人员信息";
}

/** 修改按钮操作 */
const handleUpdate = async (row?: Ab02newVO) => {
  reset();
  const _id = row?.id || ids.value[0]
  const res = await getAb02new(_id);
  Object.assign(form.value, res.data);
  dialog.visible = true;
  dialog.title = "修改新在职人员信息";
}

/** 提交按钮 */
const submitForm = () => {
  ab02newFormRef.value?.validate(async (valid: boolean) => {
    if (valid) {
      buttonLoading.value = true;
      if (form.value.id) {
        await updateAb02new(form.value).finally(() =>  buttonLoading.value = false);
      } else {
        await addAb02new(form.value).finally(() =>  buttonLoading.value = false);
      }
      proxy?.$modal.msgSuccess("操作成功");
      dialog.visible = false;
      await getList();
    }
  });
}

/** 删除按钮操作 */
const handleDelete = async (row?: Ab02newVO) => {
  const _ids = row?.id || ids.value;
  await proxy?.$modal.confirm('是否确认删除新在职人员信息编号为"' + _ids + '"的数据项？').finally(() => loading.value = false);
  await delAb02new(_ids);
  proxy?.$modal.msgSuccess("删除成功");
  await getList();
}

/** 导出按钮操作 */
const handleExport = () => {
  proxy?.download('yuanshidian/ab02new/export', {
    ...queryParams.value
  }, `ab02new_${new Date().getTime()}.xlsx`)
}

onMounted(() => {
  getList();
});
</script>
